package com.tenebrous.jestic.mapper.idao.framwork.system;

import com.tenebrous.jestic.entity.framwork.system.MetaDictionary;
import com.tenebrous.jestic.mapper.ISuperMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

//@Mapper
public interface MetaDictionaryMapper extends ISuperMapper<MetaDictionary> {

    @Select("SELECT * FROM META_DICTIONARY A WHERE A.CODE = #{code}")
    MetaDictionary getByCode(String code);

    @Select("SELECT * FROM META_DICTIONARY A WHERE A.PID = #{id} ORDER BY A.CODE")
    List<MetaDictionary> queryList(String id);

    @Select("SELECT * FROM META_DICTIONARY A ORDER BY A.CODE")
    List<MetaDictionary> queryAll();

    @Select("SELECT id,pid,code,name,remark FROM META_DICTIONARY A WHERE A.PID = #{id} ORDER BY A.CODE")
    List<Map<String, Object>> queryMapList(String id);
}